package com.mengfh.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * TODO
 *
 * @author mengfh
 * @version V1.0
 * @date 17/10/2024 21:36
 **/

@Slf4j
@Component
public class IpService {

    @Value("${swagger.access.iplist}")
    private String iplist;

    public boolean getIp(String ipAddress) {

        log.info("====>>> {}  vs  {}", ipAddress , iplist);

        return iplist.contains(ipAddress);
    }
}